package com.abner.design.patterns.decorator;


/**
 * 装饰(指的是调料)
 * @author abner
 */
public class Decorator extends Drink {

	private Drink obj;

	/**
	 * 传入你要装饰得饮品
	 * @param obj
	 */
	public Decorator(Drink obj) {
		this.obj = obj;
	}

	@Override
	public float cost() {
		return super.getPrice() + obj.cost();
	}
	
	@Override
	public String getDes() {
		return des + " " + getPrice() + " so " + obj.getDes();
	}
	
	

}
